﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:OMANE.Modules.Indicateurs" x:Class="Views.ViewZoneLayoutDefinition" 
            xmlns:sys="clr-namespace:System;assembly=mscorlib"
		     mc:Ignorable="d" 
             d:DesignHeight="150" d:DesignWidth="430" Width="Auto" MinWidth="430" MinHeight="150">


    <UniformGrid Rows="8" Columns="2" >
        <TextBlock  TextWrapping="Wrap" VerticalAlignment="Center" Margin="5,0" TextAlignment="Right" Text="Nom"/>
        <TextBox VerticalAlignment="Center" Margin="5,0" Text="{Binding Name, Mode=TwoWay}" />

        <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Margin="5,0" TextAlignment="Right" Text="Type de Graphique"/>
        <ComboBox VerticalAlignment="Center" Margin="5,0" SelectedItem="{Binding SelectedZoneType, Mode=TwoWay}" ItemsSource="{Binding ZoneTypes}" >
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}" />
                    <!--<Image Source="{Binding Icone}" />-->
                </DataTemplate>
            </ComboBox.ItemTemplate>
            <ComboBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel   />
                </ItemsPanelTemplate>
            </ComboBox.ItemsPanel>
        </ComboBox>
        <!--<TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Margin="5,0" TextAlignment="Right" Text="Spécialisation"/>
        <ComboBox VerticalAlignment="Center" Margin="5,0" Text="{Binding Name, Mode=TwoWay}">
            
        </ComboBox>-->
        <Rectangle />
        <Rectangle />
        <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Margin="5,0" TextAlignment="Right" Text="Numero de Colonne"/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Slider VerticalAlignment="Center" Margin="5,0" LargeChange="2" Maximum="20" Minimum="0" SmallChange="1" Value="{Binding StartColumn}"  />
            <TextBlock Grid.Column="1" Text="{Binding Mode=OneWay, Path=StartColumn}" />
        </Grid>
       
        <TextBlock TextWrapping="Wrap" Text="Numero de Ligne" VerticalAlignment="Center" Margin="5,0" TextAlignment="Right"/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Slider VerticalAlignment="Center" Margin="5,0" LargeChange="2" SmallChange="1" Minimum="0" Maximum="20" Value="{Binding StartRow}"/>
            <TextBlock Grid.Column="1" Text="{Binding Mode=OneWay, Path=StartRow}" />
        </Grid>
  
        <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Margin="5,0" TextAlignment="Right" Text="Nombre de Colonnes"/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Slider VerticalAlignment="Center" Margin="5,0" LargeChange="2" Maximum="{Binding MaxColumns}" Minimum="1" SmallChange="1" Value="{Binding ColumnCount, Mode=TwoWay}"/>
            <TextBlock Grid.Column="1" Text="{Binding Mode=OneWay, Path=ColumnCount}" />
        </Grid>
     
        <TextBlock TextWrapping="Wrap" Text="Nombre de Lignes" VerticalAlignment="Center" Margin="5,0" TextAlignment="Right"/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Slider VerticalAlignment="Center" Margin="5,0" LargeChange="2" SmallChange="1" Minimum="1" Maximum="{Binding MaxRows}" Value="{Binding RowCount, Mode=TwoWay}"/>
            <TextBlock Grid.Column="1" Text="{Binding Mode=OneWay, Path=RowCount}" />
        </Grid>
   
        <Button Content="Valider" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" Click="OK_Click"/>
        <Button Content="Annuler" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" Click="Cancel_Click"/>
    </UniformGrid>
</UserControl>
